package org.darkforest.common.services.impl;

import java.util.List;

import org.darkforest.common.services.HealthOrgAppointmentService;
import org.darkforest.dao.mapper.HealthOrgAppointmentMapper;
import org.darkforest.model.HealthOrgAppointment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HealthOrgAppointmentServiceImpl implements HealthOrgAppointmentService {

    @Autowired
    private HealthOrgAppointmentMapper appointmentMapper;

    @Override
    public int batchUpdateAppointment(List<HealthOrgAppointment> record) {

        int count = 0;

        for (HealthOrgAppointment appointment: record) {
            count = count + appointmentMapper.updateAppointmentInfo(appointment);
        }

        return count;
    }
}
